package com.sms.plateform.kernel.dao.impl;

import java.util.List;
import java.util.Map;

import com.sms.plateform.common.page.PageProperty;
import com.sms.plateform.kernel.dao.impl.BaseDaoImpl;
import com.sms.plateform.kernel.dao.IBusinesscardDao;
import com.sms.plateform.kernel.entity.Businesscard;

/**
 * @Description:实现类
 * @author 
 * @version 1.0
 * @created 
 */
public class BusinesscardDaoImpl extends BaseDaoImpl<Businesscard> implements IBusinesscardDao {

	public void insertNewCard(Map<String, Object> param) {
		this.getSqlMapClientTemplate().insert("insertNewCard", param);
	}

	public int getBusinessCardListCount(PageProperty pp) {
		Integer count = (Integer) this.getSqlMapClientTemplate().queryForObject("getBusinessCardListCount", pp.getParamMap());
		return count.intValue();
	}

	public List<Map<String, Object>> getCatForRelPageList(PageProperty pp) {
		return this.getSqlMapClientTemplate().queryForList("getCatForRelPageList", pp.getParamMap());
	}

	public void deleteBusinessCardByIds(Map<String, Object> param) {
		this.getSqlMapClientTemplate().delete("deleteBusinessCardByIds", param);
	}

	public void addBusinessCardGroup(Map<String, Object> param) {
		this.getSqlMapClientTemplate().insert("addBusinessCardGroup", param);
	}

	public void deleteBusinesscardGroupById(Map<String, Object> param) {
		this.getSqlMapClientTemplate().delete("deleteBusinesscardGroupById", param);
	}

	public void deleteBusinesscardByGroupId(Map<String, Object> param) {
		this.getSqlMapClientTemplate().delete("deleteBusinesscardByGroupId", param);
	}

	public Map<String, Object> getBusinessCardInfo(Map<String, Object> param) {
		return (Map<String, Object>) this.getSqlMapClientTemplate().queryForObject("getBusinessCardInfo", param);
	}

	public void updateBusinessCard(Map<String, Object> param) {
		this.getSqlMapClientTemplate().update("updateBusinessCard", param);
	}
	
}
